package org.dr.st_docker.aop.schemabased;

import org.dr.st_docker.aop.schemabased.service.IService;
import org.dr.st_docker.aop.schemabased.service.ServiceImpl;
import org.springframework.aop.framework.ProxyFactoryBean;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;


public class Test {
    public static void main(String[] args) {
        AbstractApplicationContext applicationContext =
                new ClassPathXmlApplicationContext("applicationContextj.xml");
        IService bean = (IService) applicationContext.getBean("serviceImpl");
        System.out.println("主类输出--"+bean.say());
        System.out.println("主类输出--"+bean.sleep());
        applicationContext.close();//关闭applicationContext
    }
}
